package org.axed.user.client;

import com.google.gwt.core.client.EntryPoint;
import com.google.gwt.core.client.GWT;
import org.axed.user.client.axessory.HPositionBar;
import org.axed.user.client.axessory.VPositionBar;
import org.axed.user.client.axessory.VimBar;
import org.axed.user.client.axessory.VimInput;
import org.axed.user.client.jsni.AxedBox;
import org.axed.user.client.jsni.KeyPressListener;
import org.timepedia.exporter.client.Exporter;

/**
 * Exports the AxedArea Widged for native use from JS.
 */
public class AxedLib implements EntryPoint {

	/**
	 * This is the entry point method.
	 */
	public void onModuleLoad() {
		((Exporter) GWT.create(AxedArea.class)).export();
		((Exporter) GWT.create(AxedBox.class)).export();
		((Exporter) GWT.create(HPositionBar.class)).export();
		((Exporter) GWT.create(VPositionBar.class)).export();
		((Exporter) GWT.create(FindResult.class)).export();
		((Exporter) GWT.create(KeyPressListener.class)).export();
		_runOnGwtLoad();
	}

	private native void _runOnGwtLoad() /*-{
		if ($doc.body.getAttribute("onGwtLoad") != "undefined") {
			eval($doc.body.getAttribute("onGwtLoad"));
		}
	}-*/;
}
